import { i18n } from '@/common/utils';
import { RJSFSchema } from '@rjsf/utils';

export const alignJsonData: RJSFSchema = {
  if: {
    properties: {
      Tabs: { const: 'Align' },
    },
  },
  then: {
    properties: {
      Selection: {
        title: i18n.t('Selection'),
        type: 'object',
        properties: {
          source: {
            title: i18n.t('Source'),
            type: 'array',
            maxItems: 1, // 表示单选，选中一个后可自动切换到target
            ...{
              'x-options': ['line'],
            },
          },
          target: {
            title: i18n.t('Target'),
            type: 'array',
            ...{
              'x-options': ['line'],
            },
          },
        },
      },
    },
  },
};
